import java.util.*;
import java.io.*;

class a1{
    private static int cnt;
    private static int[] a=new int[11];
    public static void main(String[] args) {
        cnt=0;
        InputStreamReader isr=new InputStreamReader(System.in);
        BufferedReader bf=new BufferedReader(isr);
        String s=null;
        try {
           s=bf.readLine().toString(); 
           //System.out.println(s);
           String[] ss=s.split(",");
           int n=Integer.parseInt(ss[0]);
           int k=Integer.parseInt(ss[1]);
           cnt=0;
           for(int i=0;i<11;i++){
            a[i]=1;
           }
           dfs(n,k,1);

           System.out.println(cnt);

        } catch (Exception e) {
           
        }
    }
    public static void dfs(int n,int k,int t){
        // System.out.println(n+" "+k +" "+t);
        for(int i=a[t-1];i<=n/(k-t+1);i++){
            if(t==k){
                a[t]=n;
                cnt++;
                break;
            }else{
                a[t]=i;
                dfs(n-i,k,t+1);
            }
        }
    }
    
}